//
//  YFCompose.swift
//  微博
//
//  Created by 余仿 on 16/4/15.
//  Copyright © 2016年 YF. All rights reserved.
//

import UIKit

class YFCompose: NSObject {

    var target:String?

    var title:String?

    var icon:String?

    //字典转模型
    init(dict:[String:AnyObject]) {
        super.init()
        setValuesForKeysWithDictionary(dict)
    }

    //过滤模型中不存在(不需要)的键值
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {}

    //模型对象的字符串描述
    override var description: String {
        let keys = ["target","title","icon"]

        let dict = self.dictionaryWithValuesForKeys(keys)
        return dict.description

    }

}
